
import httpUtils from "../../../commons/utils/FeatchUtils";
import {basicUrl} from "../../../configs/DefaultConfig";

/**
 * 为岗位管理的新增中岗位类别管理搜索增加分页方法
 * @param params
 * @returns {Promise<*>}
 */
export async function getPositionCategoryByPage(params = {}) {
    Object.assign(params, {S_code: 'desc'});
    return httpUtils.postJson(basicUrl + "/positionCategory/findByPage", params);
}
/**
 *
 * @param params
 * @returns {Promise<*>}
 */
export async function getAllPositionCategory(params = {}) {
  Object.assign(params, {S_code: 'desc'});
  return httpUtils.get(basicUrl + "/positionCategory/findAll", params);
}

export async function save(params = {}) {
    return httpUtils.postJson(basicUrl + "/positionCategory/save",JSON.stringify(params));
}

/**
 * 删除
 * * param id
 * return 操作结果
 */
export async function deletePositionCategory(param=""){
    return httpUtils.delete(basicUrl+"/positionCategory/delete",param);
}

